function getClass(parent,aE){
	var arr=[];
	var aResult=parent.getElementsByTagName('*');
	for(var i=0;i<aResult.length;i++){
		var bbb=aResult[i].className.split(' ');
		for(var j=0;j<bbb.length;j++){
			if(bbb[j]==aE){
			arr.push(aResult[i]);
			}
		}
		
	}
	return arr;
}
var oCarous=document.getElementById('carous');
var oImg=oCarous.getElementsByTagName('img');
var Ul=document.getElementById('opUl');
var oCarLi=Ul.getElementsByTagName('li');
var newnum=0;
function autoPlay(){
	newnum++;
	if(newnum>oImg.length-1){
		newnum=0;
	}
	tab();
}
var Cartimer=setInterval(autoPlay,5000);
function tab(){
	for(j=0;j<oImg.length;j++){
		oImg[j].style.opacity=0;
		oCarLi[j].className='';
	}
	oCarLi[newnum].className='active';
	startmove(oImg[newnum],{opacity:100});
}
oCarous.onmouseover=function(){
	clearInterval(Cartimer);
}
oCarous.onmouseout=function(){
	Cartimer=setInterval(autoPlay,5000);
}
for(i=0;i<oCarLi.length;i++){
	oCarLi[i].index=i;
	oCarLi[i].onclick=function(){
		newnum=this.index;
		tab();
	}
}